package com.itic.mall.mobile.sys;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.itic.appbase.applications.sys.syssetting.service.SysSettingService;

import com.itic.mall.mobile.base.BaseMobileInterface;

@Controller
@RequestMapping(value="mobile/sys")
public class SysSettingInterface extends BaseMobileInterface {
	
	private SysSettingService sysSettingService; 
	
	@RequestMapping(value="withDrawFee")
	@ResponseBody
	public Map<String, Object> getFreeAmount(HttpServletResponse response){
		Map<String, Object> resultMap = new HashMap<>();
		String errorCode = PARAM_ERROR_CODE;
		String errorMsg = PARAM_ERROR_MSG;
		try {
			double value = this.getFeeAmount();
			resultMap.put(DATA, value);
			errorCode = SUCCESS_ERROR_CODE;
	    	errorMsg = SUCCESS_ERROR_MSG;
		} catch (Exception e) {
			errorCode = SERVER_ERROR_CODE;
			errorMsg = SERVER_ERROR_MSG;
			logException("SysSettingInterface", "getFreeAmount", e.toString(), "获取提现手续费", e);
		}
		resultMap.put(CODE, errorCode);
    	resultMap.put(MSG, errorMsg);
    	isCrrossDomain(response);
    	return resultMap;
	}
	
}
